package com.lonton.intercepter;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
@Configuration
public class SomeWebMvcConfig extends WebMvcConfigurationSupport{
	@Override
	protected void addInterceptors(InterceptorRegistry registry) {
		registry.addInterceptor(new SomeIntercepter())
				.addPathPatterns("/first/**") //拦截first开关的请求
				.excludePathPatterns("/second/**");//不拦截second开头的请求
	}

}
